package org.ykh.srb.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 借款人
 * </p>
 *
 * @author ykh
 * @since 2024-03-12
 */
@Getter
@Setter
@TableName("borrower")
@Schema(name = "BorrowerEntity", description = "借款人")
public class BorrowerEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "用户id")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "姓名")
    @TableField("name")
    private String name;

    @Schema(description = "身份证号")
    @TableField("id_card")
    private String idCard;

    @Schema(description = "手机")
    @TableField("mobile")
    private String mobile;

    @Schema(description = "性别（1：男 0：女）")
    @TableField("sex")
    private Byte sex;

    @Schema(description = "年龄")
    @TableField("age")
    private Byte age;

    @Schema(description = "学历")
    @TableField("education")
    private Byte education;

    @Schema(description = "是否结婚（1：是 0：否）")
    @TableField("is_marry")
    private Boolean marry;

    @Schema(description = "行业")
    @TableField("industry")
    private Byte industry;

    @Schema(description = "月收入")
    @TableField("income")
    private Byte income;

    @Schema(description = "还款来源")
    @TableField("return_source")
    private Byte returnSource;

    @Schema(description = "联系人名称")
    @TableField("contacts_name")
    private String contactsName;

    @Schema(description = "联系人手机")
    @TableField("contacts_mobile")
    private String contactsMobile;

    @Schema(description = "联系人关系")
    @TableField("contacts_relation")
    private Byte contactsRelation;

    @Schema(description = "状态（0：未认证，1：认证中， 2：认证通过， -1：认证失败）")
    @TableField("status")
    private Byte status;

    @Schema(description = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除(1:已删除，0:未删除)")
    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;
}
